#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <fstream>
#include <set>

using namespace std;

float mySqrt(float input)
{
    float lo = input, hi = 1;
    float mid;
    while(fabs(hi - lo) > 0.00001) {
    mid = lo + (hi - lo)/2;
    if (mid * mid > input)
       hi = mid;
    else
                                                                 lo = mid;
                                                                                 } 

                   return mid;
}

int main(int argc, char **argv)
{

    cout << "-----------------Test 1--------------------" << endl;
    cout << mySqrt(0.5) << endl;

    cout << "-----------------Test 2--------------------" << endl;


    cout << "-----------------Test 3--------------------" << endl;


    cout << "-----------------Test 4--------------------" << endl;


    cout << "-----------------Test 5--------------------" << endl;



}
